﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="newcomment.aspx.cs" Inherits="linkDATABASE.留言评论.newcomment" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>添加评论</title>
    <style>
        table {
            border-collapse: collapse;
            box-shadow: 7px 9px 5px 0px #00000052;
        }

        td {
            border: 1px solid black;
            padding: 6px;
        }
    </style>
</head>
<body>
    <h2>通过id添加评论</h2>
    <form id="form1" runat="server">
        <div>
            <asp:Panel ID="Panel1" runat="server">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                    <asp:BoundField DataField="Detail" HeaderText="Detail" SortExpression="Detail" />
                    <asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time" />
                    <asp:BoundField DataField="Back" HeaderText="Back" SortExpression="Back" />
                </Columns>
            </asp:GridView>
            </asp:Panel>
            <br />
            留言id: <asp:TextBox ID="TextBoxid" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
            &nbsp;<asp:Button ID="Buttonsee" runat="server" Text="查看" />
&nbsp;<asp:Label ID="Label1" runat="server" Text="你将会为这一条留言添加评论/不显示代表不存在这个留言" ForeColor="#999999"></asp:Label>
            <br />
            <br />
            <table>
                <tr>
                    <td>您的昵称</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>评论内容</td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server" Height="124px" TextMode="MultiLine" Width="281px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">&nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加评论" />
                        &nbsp;<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="清空" />
                        &nbsp;<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="查看大家的留言" />
                    </td>
                </tr>
            </table>
        </div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GuestBookConnectionString %>" SelectCommand="SELECT * FROM [gusetbookinfo]"></asp:SqlDataSource>
    </form>
</body>
</html>
